1. Field of the Invention
The present invention relates to a switch circuit which includes a plurality of switches and an information processing device for detecting operation statuses of the switches.
2. Description of the Related Art
A plurality of key switches are provided on the operation panel of electronic equipment such as television set or within the casing thereof. The operation statuses of the key switches are determined, for example, by an information processing device such as embedded microcomputer. The term “operation statuses of the key switches” refers to the ON/OFF statuses of the key switches. Unlike general-purpose computers, embedded microcomputers are designed primarily to control equipment and incorporate I/O (input/output) ports, an A/D (analog-to-digital) converter, a D/A (digital-to-analog) converter and other components in addition to a CPU (Central Processing Unit).
A first example of a known switch circuit (direct type) is shown in FIG. 1. Two series circuits are connected between a line, supplied with a positive source voltage, and ground. One of the series circuit has a pull-up resistor R10 and key switch S10. The other series circuit has a pull-up resistor R20 and key switch S20. The connection points respectively between the pull-up resistor R10 and key switch S10 and the pull-up resistor R20 and key switch S20 are connected to I/O ports of an information processing device 1. The information processing device 1 can determine the operation status of each key switch by determining whether the voltage level of the I/O port is high or low. The first example requires as many I/O ports as the total number of key switches, possibly resulting in an increased number of I/O ports for systems using a large number of key switches.
A second example of a known switch circuit (key matrix) is shown in FIG. 2. Key switches S11, S12, S21 and S22 are connected respectively at the intersections between an input line I1 and an output line O1, the input line I1 and an output line O2, an input line I2 and the output line O1, and the input line I2 and the output line O2. One of the output lines such as the line O1 is pulled up to high level. When the key switches S11 and S21 connected to the output line O1 are OFF, the input lines I1 and I2 are pulled down to low level. When the key switches S11 and S21 are ON, the input lines I1 and I2 are pulled up to high level. Key matrix allows for the determination of the operation statuses of a plurality of key switches at the same time. Key matrix provides a reduced number of I/O ports required for the total number of key switches as compared to the first type (direct type).
A third example of a known switch circuit (voltage detection type) is shown in FIG. 3. Such a circuit is described, for example, in Japanese Patent Laid-Open No. 2008-131284.
A connection point A which is connected to a line supplied with a positive source voltage via a pull-up resistor 30 is grounded via a key switch S31. An anti-chatter capacitor C10 is connected in parallel with the key switch S31. Further, the connection point A is grounded via a series circuit, which has resistors R31, R32, R33, R34 and R35, and a key switch S36. The voltage level of the connection point A serves as an input voltage of an A/D converter 1a of the information processing device 1.
When one of the key switches S31 to S36 turns ON, the voltage of the connection point A changes to a level associated with the key switch which has turned ON. This voltage level is converted to digital data by the A/D converter 1a, after which the information processing device 1 determines, based on the digital data, which key switch has turned ON.
The third example is problematic in that it cannot detect the simultaneous activation of a plurality of key switches, making it limited in its application. The third example provides a reduced number of I/O ports as compared to the second example (key matrix). However, this example requires an A/D converter port which can receive an analog voltage input. As a result, a general-purpose I/O port GPIO (General Purpose Input Output) cannot be used. A general-purpose I/O port can only determine whether the input analog voltage is at high or low level.
A fourth example of a known switch circuit (voltage detection type) is shown in FIG. 4. The voltage level of the connection point A serves as an analog voltage input of the A/D converter 1a of the information processing device 1. A pull-up resistor R40 is connected to the connection point A. Three series circuits are also connected to the connection point A. One of these series circuits has a pull-up resistor R41 and key switch S41, another a pull-up resistor R42 and key switch S42, and still another a pull-up resistor R43 and key switch S43. The parallel combined resistance changes according to a key switch which turns ON among the key switches S41 to S43, whereby the voltage at the connection point A changes. Therefore, if the analog voltage level of the connection point A is fed to the A/D converter 1a, the information processing device 1 can determine the operation statuses of the key switches.
The fourth example can detect the simultaneous activation of two or more of a plurality of key switches. In order to increase the number of key switches connected to the A/D converter port, however, the resistances must be accurate. As a result, the selection of resistors is cumbersome, making it difficult to increase the number of key switches. Although the fourth example provides a reduced number of I/O ports as compared to the second example (key matrix), this example requires an A/D converter port which can receive an analog voltage input. As a result, a general-purpose I/O port cannot be used.